image.png<%@ page contentType="text/html; charset=UTF-8anguage="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset=UTF-8>
    <meta name=viewport" content="width=device-width, initial-scale=10>
    <title>系统设置 - 应急防护小站</title>
    <link href=https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6css/all.min.css">
    <style>
        .gradient-bg {
            background: linear-gradient(135g, #667a 0%, #764ba2100);
        }
    </style>
</head>
<body class="bg-gray-50
    <!-- 导航栏 -->
    <nav class="gradient-bg text-white shadow-lg">
        <div class=container mx-auto px-6 py-4>
            <div class=flex items-center justify-between>
                <div class=flexitems-center space-x-3">
                    <i class=fasfa-shield-alt text-2xl"></i>
                    <h1 class=text-xl font-bold">应急防护小站</h1>
                    <span class="text-sm opacity-75">系统设置</span>
                </div>
                <div class=flexitems-center space-x-4">
                    <a href="admin-dashboard.jsp" class="hover:text-blue-200 transition-colors">
                        <i class=fas fa-arrow-left mr-2"></i>返回管理中心
                    </a>
                    <a href="logout" class="hover:text-red-200 transition-colors">
                        <i class="fas fa-sign-out-alt mr-2"></i>退出登录
                    </a>
                </div>
            </div>
        </div>
    </nav>

    <div class=container mx-auto px-6 py-8>
        <!-- 页面标题 -->
        <div class=mb-8">         <h2ss="text-3ont-bold text-gray-800">系统设置</h2>
            <p class=text-gray-600>配置网站基本参数和功能开关</p>
        </div>

        <!-- 设置表单 -->
        <div class="bg-white rounded-lg shadow-md p-6
            <form action="system-setting" method="post>
                <input type="hidden" name="action value="update">
                
                <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                    <!-- 基本设置 -->
                    <div class="space-y-4">
                        <h3 class="text-lg font-semibold text-gray-800">基本设置</h3>
                        
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-2">网站名称</label>
                            <input type="text name="site_name value=                   class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2ocus:ring-blue-500">
                        </div>
                        
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-2">网站描述</label>
                            <textarea name=site_description" rows="3" 
                                      class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2ocus:ring-blue-500>守护生命安全</textarea>
                        </div>
                        
                        <div>
                            <label class="block text-sm font-medium text-gray-70 mb-2>会话超时时间（秒）</label>
                            <input type="number" name="session_timeout" value="3600" 
                                   class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2ocus:ring-blue-500">
                        </div>
                        
                        <div>
                            <label class="block text-sm font-medium text-gray-7002>最大登录尝试次数</label>
                            <input type=number name=max_login_attempts" value="5" 
                                   class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2ocus:ring-blue-500">
                        </div>
                    </div>
                    
                    <!-- 功能开关 -->
                    <div class="space-y-4">
                        <h3 class="text-lg font-semibold text-gray-800">功能开关</h3>
                        
                        <div class=flex items-center justify-between">
                            <div>
                                <label class="text-sm font-medium text-gray-700                   <p class=text-xs text-gray-500>启用后网站将显示维护页面</p>
                            </div>
                            <label class="relative inline-flex items-center cursor-pointer">
                                <input type="checkbox" name=maintenance_mode" value="true" 
                                       class="sr-only peer">
                                <div class=w-116gray-200peer-focus:outline-none peer-focus:ring-4er-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[ter:absolute after:top-2x] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-55ter:transition-all peer-checked:bg-blue-600"></div>
                            </label>
                        </div>
                        
                        <div class=flex items-center justify-between">
                            <div>
                                <label class="text-sm font-medium text-gray-700                   <p class=text-xs text-gray-500                   </div>
                            <label class="relative inline-flex items-center cursor-pointer">
                                <input type="checkbox name=nable_registration" value="true" checked
                                       class="sr-only peer">
                                <div class=w-116gray-200peer-focus:outline-none peer-focus:ring-4er-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[ter:absolute after:top-2x] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-55ter:transition-all peer-checked:bg-blue-600"></div>
                            </label>
                        </div>
                        
                        <div class=flex items-center justify-between">
                            <div>
                                <label class="text-sm font-medium text-gray-700                   <p class=text-xs text-gray-500                   </div>
                            <label class="relative inline-flex items-center cursor-pointer">
                                <input type="checkbox" name="enable_feedback" value="true" checked
                                       class="sr-only peer">
                                <div class=w-116gray-200peer-focus:outline-none peer-focus:ring-4er-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[ter:absolute after:top-2x] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-55ter:transition-all peer-checked:bg-blue-600"></div>
                            </label>
                        </div>
                        
                        <div class=flex items-center justify-between">
                            <div>
                                <label class="text-sm font-medium text-gray-700                   <p class=text-xs text-gray-500>允许用户参与防护知识测验</p>
                            </div>
                            <label class="relative inline-flex items-center cursor-pointer">
                                <input type="checkbox" name="enable_quiz" value="true" checked
                                       class="sr-only peer">
                                <div class=w-116gray-200peer-focus:outline-none peer-focus:ring-4er-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[ter:absolute after:top-2x] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-55ter:transition-all peer-checked:bg-blue-600"></div>
                            </label>
                        </div>
                    </div>
                </div>
                
                <!-- 提交按钮 -->
                <div class=mt-8 justify-end space-x-4">
                    <button type=button" onclick=window.location.href='admin-dashboard.jsp'" 
                            class="px-6t-gray-700 bg-gray-200 rounded-md hover:bg-gray-300 transition-colors">
                        取消
                    </button>
                    <button type="submit" 
                            class=px-62lue-500 text-white rounded-md hover:bg-blue-600 transition-colors">
                        <i class="fas fa-save mr-2"></i>保存设置
                    </button>
                </div>
            </form>
        </div>
        
        <!-- 系统信息 -->
        <div class="mt-8g-white rounded-lg shadow-md p-6">         <h3 class="text-lg font-semibold text-gray-800">系统信息</h3>
            <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mt-4>
                <div class="bg-blue-50 p-4 rounded-lg">
                    <div class=flex items-center">
                        <i class="fas fa-server text-blue-500 mr-3"></i>
                        <div>
                            <p class=text-sm text-gray-600">服务器</p>
                            <p class="font-semibold>Apache Tomcat 9.0.98</p>
                        </div>
                    </div>
                </div>
                <div class="bg-green-50 p-4 rounded-lg">
                    <div class=flex items-center">
                        <i class="fas fa-database text-green-500 mr-3"></i>
                        <div>
                            <p class=text-sm text-gray-600">数据库</p>
                            <p class="font-semibold">MySQL 8.0</p>
                        </div>
                    </div>
                </div>
                <div class="bg-purple-50 p-4 rounded-lg">
                    <div class=flex items-center">
                        <i class="fas fa-code text-purple-500 mr-3"></i>
                        <div>
                            <p class=text-sm text-gray-600">技术栈</p>
                            <p class="font-semibold">Java + JSP + Servlet</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // 处理复选框的值
        document.querySelectorAll('input[type="checkbox"]').forEach(checkbox => {
            checkbox.addEventListener(change', function()[object Object]              this.value = this.checked ? true : false;
            });
        });
    </script>
</body>
</html> 